package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the TITULO_ORDEN database table.
 * 
 */
@Entity
@Table(name="TITULO_ORDEN")
public class TituloOrden implements Serializable {
	private static final long serialVersionUID = 1L;
	private TituloOrdenPK id;
	private String agntSync;
	private String anoTitu;
	private String areaRegId;
	private String numTitu;
	private String sistemaId;
	private Date tsUltSync;
	private Orden orden;

    public TituloOrden() {
    }


	@EmbeddedId
	public TituloOrdenPK getId() {
		return this.id;
	}

	public void setId(TituloOrdenPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="ANO_TITU", nullable=false, length=4)
	public String getAnoTitu() {
		return this.anoTitu;
	}

	public void setAnoTitu(String anoTitu) {
		this.anoTitu = anoTitu;
	}


	@Column(name="AREA_REG_ID", length=5)
	public String getAreaRegId() {
		return this.areaRegId;
	}

	public void setAreaRegId(String areaRegId) {
		this.areaRegId = areaRegId;
	}


	@Column(name="NUM_TITU", nullable=false, length=8)
	public String getNumTitu() {
		return this.numTitu;
	}

	public void setNumTitu(String numTitu) {
		this.numTitu = numTitu;
	}


	@Column(name="SISTEMA_ID", nullable=false, length=3)
	public String getSistemaId() {
		return this.sistemaId;
	}

	public void setSistemaId(String sistemaId) {
		this.sistemaId = sistemaId;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to Orden
    @ManyToOne
	@JoinColumn(name="REFNUM_ORDEN", nullable=false, insertable=false, updatable=false)
	public Orden getOrden() {
		return this.orden;
	}

	public void setOrden(Orden orden) {
		this.orden = orden;
	}
	
}